import random

p = ["a", "b", "c", "d"]
t = ["a", "b", "c", "d"]
d = {}

for j, i in enumerate(p):
    while 1:
     r = random.choice(t)
     if r!=i:
        break
     else:
        continue
    t.remove(r)
    d[i] = r

for i,j in d.items():
    print(f"{j}收到了{i}的礼物")